import { localeProps } from "../../utils";

const label = "分割线";
const name = "a-divider";

export default {
  icon: "icon-divider",
  label,
  name,
  rule() {
    return {
      type: name,
      props: {},
      wrap: { show: false },
      native: false,
      children: [""],
    };
  },
  props(_, { t }) {
    return localeProps(t, name + ".props", [
      {
        type: "select",
        field: "direction",
        title: "设置分割线方向",
        options: [
          {
            label: "水平",
            value: "horizontal",
          },
          {
            label: "竖直",
            value: "vertical",
          },
        ],
      },
      {
        type: "input",
        field: "formCreateChild",
        title: "分割线描述文字",
      },
      {
        type: "select",
        field: "orientation",
        title: "分割线文字的位置",
        options: [
          {
            label: "left",
            value: "left",
          },
          {
            label: "right",
            value: "right",
          },
          {
            label: "center",
            value: "center",
          },
        ],
      },
      {
        type: "select",
        field: "type",
        title: "分割线样式类型",
        options: [
          {
            label: "solid",
            value: "solid",
          },
          {
            label: "dashed",
            value: "dashed",
          },
          {
            label: "dotted",
            value: "dotted",
          },
          {
            label: "double",
            value: "double",
          },
        ],
      },
    ]);
  },
};
